﻿@using Kojarskiy
@using Kojarskiy.Models
@using Kojarskiy.Core
@model IEnumerable<Kojarskiy.Models.SiteMap>

@{
    ViewBag.Title = "Результаты поиска";
}

@Html.ActionLink("Главная", "Index", "Home") | @ViewBag.Title
<div style="clear: both;"></div>

<h1>@ViewBag.Title</h1>

@if (Model.Count() > 0)
{
    foreach (var page in Model)
    {
        <div class="form-group">
            <a href="@Url.Action("Page","Home",new{page = page.Path})" style="text-decoration: underline;">@page.Title</a>
            <div>
                @page.Content.StripHtml().Substring(0, 100)...<a href="@Url.Action("Page","Home",new{page = page.Path})" style="text-decoration: underline;"><span class="glyphicon glyphicon glyphicon-chevron-right small" style="color: gray;"></span></a>
            </div>

        </div>
    }
}
else
{
    <div class="alert alert-info">К сожалению, по вашему запросу нет результатов</div>
}

<script type="text/javascript">

</script>